<?php
use common\components\widgets\Datetimepicker;
use common\components\helpers\Fun;
use common\components\extenders\MenuManage;
use doumiaoduo\layer\LayerConfirmWidget;
use doumiaoduo\layer\LayerIframeWidget;

LayerConfirmWidget::widget();
LayerIframeWidget::widget();
use yii\helpers\Html;
Datetimepicker::widget(['flag'=>'timepicker']);
Datetimepicker::widget(['timepicker' => 'true','datepicker'=>'false','format'=>'H:i','step'=>'5']);
?>
<div class="yx-cnt-box yx-radius2">
    <div class="yx-praise-box">
        <div class="yx-search-class">
            <div class="yx-radius2 ">
                <div id="search-area" class="yx-bgf7f7f7 yx-radius5 zx-mg yx-function2 yx-pr0">
                    <?= Html::beginForm(Fun::url(['growthlog/index']), 'get', ['enctype' => 'multipart/form-data']) ?>
                    <?= \common\components\helpers\Search::textInput('teacher', \Yii::$app->request->get('teacher'), ['label'=>'教师姓名','class' => 'yx-width150 zx-lh24 yx-ml6']); ?>
                    <?= \common\components\helpers\Search::textInput('course', \Yii::$app->request->get('course'), ['label'=>'会员名称','class' => 'yx-width150 zx-lh24 yx-ml6']); ?>
                    <?= \common\components\helpers\Search::textInput('classroom', \Yii::$app->request->get('classroom'), ['label'=>'教室名称','class' => 'yx-input-text zx-width150 yx-ml6']); ?>
                    <?= \common\components\helpers\Search::submitButton('搜索', ['id'=>'search-handle','class'=>"yx-search yx-radius2"]); ?>
                    <?php Html::endForm() ?>
                </div>
            </div>
        </div>
        <div class="yx-class-box">
            <div class="tab-content">
                <div class="tab-pane active" id="class11">
                    <?php if (count($data) > 0) {
                       foreach ($data as $k => $v) {?>
                            <div class="yx-class-list yx-radius2 yx-floatl" style="height: 320px">
                                <img src="<?=$v['avatar']?>" class="yx-border1 img-circle" width="73" height="73">
                                <ul style="height: 200px">
                                    <li>课程名称：<?= $v['course_name'] ?> [<?= $v['is_old']==1?'是':'非'?>老班]</li>

                                    <li>教师名称：<?= $v['teacher_name'] ?></li>

                                    <li>教室名称：<?= $v['classroom_name'] ?></li>

                                    <li>开班人数：<?= $v['opening_number'] . '人' ?></li>

                                    <li>已报数量：<?= $v['COUNT(id)'] . '次' ?></li>

                                    <li>最大人数：<?= $v['max_number'] . '人' ?></li>

                                    <li>上课时间：<?= $v['class_time'] ?></li>
                                </ul>
                                <?=(new MenuManage(MenuManage::TOP_MENU))->detailsMenu('growthlog','student',true,['rel'=>'dialog-show-iframe','class' => 'btn yx-classmagage-about yx-width47 yx-bgfbc74f yx-radius2','style'=>'margin-left:25%','data'=>['id'=>$v['id'],'name'=>'学员列表']]);?>

                            </div>
                        <?php }} ?>

                    <div class="yx-clear"></div>
                </div>
                <div style="text-align: right"><?= common\components\widgets\GoPager::widget(['pagination' => $pages]) ?></div>
            </div>
        </div>
    </div>
</div>